function CE.Warrior(arg1, goat2)
--arg1 = "v1" or "v2" for debugging
--goat2: "0" = Buffs, "1" = Melee, "2" = Ranged or instant , 3 = Food and potions,
--goat2: "4" = Boss Burst buffs, "pvp" = PvP combo, "aoe" = aoe skils
    local Skill = {}
    local Skill2 = {}
    local i = 0
    
    -- Player and target status.
    local combat = GetPlayerCombatState()
    local enemy = UnitCanAttack("player","target")
	local phealth = PctH("player")
    local thealth = PctH("target")
	local playerHP = (UnitHealth("player"))
	local targetHP = UnitHealth("target")
	local pctEB1 = PctM("player")
	local pctEB2 = PctS("player")
    local EnergyBar1 = UnitMana("player")
	local EnergyBar2 = UnitSkill("player")
    local tbuffs = BuffList("target")
    local pbuffs = BuffList("player")
    local tDead = UnitIsDeadOrGhost("target")
    --local behind = (not UnitIsUnit("player", "targettarget"))
	--local behind1 = IsUsableAction(9) -- # is your blind spot spell slot number
	--local melee = GetActionUsable(45) -- # is your melee range spell slot number
	--local a1,a2,a3,a4,a5,ASon = GetActionInfo(4)  -- # is your Autoshot slot number
	--local PsiPoints, PsiStatus = GetSoulPoint()
	local ammo = (GetEquipSlotInfo(10) ~= nil)
	local zoneid = (GetZoneID() % 1000)
    local SeigeWar = (zoneid == 402) -- The "Seige War" Zone
    local boss = UnitSex("target") >= 3
    local elite = UnitSex("target") == 2
    local party = GetNumPartyMembers() >= 2
	local PetExists = UnitExists("playerpet") 
	local MobName = UnitName("target")
	local bowslot = GetEquipSlotInfo(11) == "interface\\CharacterFrame\\Equipment-RangedSlot" -- check if you have bow equiped
	
	-- Food And pot Dropdown menu locales
	local Rebuff = tonumber(CE_Settings[CE.playerName]["Tab3"]["Rebuff"])
	local HpDef = tonumber(CE_Settings[CE.playerName]["Tab3"]["HpDef"])
	local HpDef_Use = (not pbuffs[CE.BuffCheck("HpDef")] or pbuffs[CE.BuffCheck("HpDef")].time <= Rebuff)
	local HpDef_Check = CE_Settings[CE.playerName]["Tab3"]["HpDef_Check"]
	local DmgFood = tonumber(CE_Settings[CE.playerName]["Tab3"]["DmgFood"])
	local DmgFood_Use = (not pbuffs[CE.BuffCheck("DmgFood")] or pbuffs[CE.BuffCheck("DmgFood")].time <= Rebuff)
	local DmgFood_Check = CE_Settings[CE.playerName]["Tab3"]["DmgFood_Check"]
	local SpeedPot = tonumber(CE_Settings[CE.playerName]["Tab3"]["SpeedPot"])
	local SpeedPot_Use = not pbuffs[CE.BuffCheck("SpeedPot")]
	local SpeedPot_Check = CE_Settings[CE.playerName]["Tab3"]["SpeedPot_Check"]
	local CritFood = tonumber(CE_Settings[CE.playerName]["Tab3"]["CritFood"])
	local CritFood_Use = not pbuffs[CE.BuffCheck("CritFood")]
	local CritFood_Check = CE_Settings[CE.playerName]["Tab3"]["CritFood_Check"]
	local CritPot = tonumber(CE_Settings[CE.playerName]["Tab3"]["CritPot"])
	local CritPot_Use = not pbuffs[CE.BuffCheck("CritPot")]
	local CritPot_Check = CE_Settings[CE.playerName]["Tab3"]["CritPot_Check"]
	local Sigil = tonumber(CE_Settings[CE.playerName]["Tab3"]["Sigil"])
	local Sigil_Use = not pbuffs[CE.BuffCheck("Sigil")]
	local Sigil_Check = CE_Settings[CE.playerName]["Tab3"]["Sigil_Check"]
	local ISFood =  tonumber(CE_Settings[CE.playerName]["Tab3"]["ItemShop"])
	local ISFood_Use = (not pbuffs[CE.BuffCheck("ItemShop")] or pbuffs[CE.BuffCheck("ItemShop")].time <= Rebuff)
	local ISFood_Check = CE_Settings[CE.playerName]["Tab3"]["ItemShop_Check"]
	local Realgar = CE_Settings[CE.playerName]["BurstSlim"]["Realgar"]
	local Realgar_Use = (not pbuffs[501616] or pbuffs[501616].time <= Rebuff)
	local Hero = CE_Settings[CE.playerName]["BurstSlim"]["Hero_Pot"]
	local Hero_Use = (not pbuffs[501337] or pbuffs[501337].time <= Rebuff)
	local LongBuff = CE_Settings[CE.playerName]["BurstSlim"]["5MinBuff"]
	
    --Silence, Substitute and Protect Logic
	local silenceList = CE.silenceList
	local protectList = CE.protectList
	local subList = CE.subList
    local tSpell,tTime,tElapsed = UnitCastingTime("target")
    local silenceThis = tSpell and silenceList[tSpell] and ((tTime - tElapsed) > 0.1)
    local protect = tSpell and protectList[tSpell] and ((tTime - tElapsed) > 0.1)
    local subThis = tSpell and subList[tSpell] and ((tTime - tElapsed) > 0.1)
	
	--Determine Class-Combo
    mainClass, subClass = UnitClassToken( "player" )
	
    --Begin Player Skill Sequences
        --Rogue = THIEF, Scout = RANGER, Mage = MAGE, Knight = KNIGHT, 
        --Druid = DRUID, Priest = AUGUR, Warden = WARDEN, Warrior = WARRIOR
		--Champion = PSYRON, Warlock = HARPSYN
	if mainClass == "WARRIOR" then
		-------------------
		-- WARRIOR/ROGUE --
		-------------------
		if subClass == "THIEF" then
			if (goat2 == "0") then
				Skill = {
					{ name = "Survival Instinct",            	use = (phealth <= .25) and combat },
					{ name = "Enraged",            	    	    use = (EnergyBar2 <= 20)  },
					{ name = "Action: 77",          			use = (phealth <= .80) }              
						}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
						
			if ((enemy) and (goat2 == "1")) then
				Skill2 = {
					{ name = "Action: 00 (HP pot)",          	   use = (phealth < 0.10) },
					{ name = "Slash",                     	       use = ((EnergyBar1 >= 25) and not tbuffs[500081]) },				
					--{ name = "Action: 10 (Brash Ferocity Strike)", use = (tbuffs[501502] and not tbuffs["Brash Ferocity Strike"]) },
					{ name = "Splitting Chop",                     use = (tbuffs[501503] and not tbuffs[503161]) },
					{ name = "Thunder",                   		   use = ((EnergyBar1 >= 15) and tbuffs[501503]) },
					{ name = "Open Flank",                   	   use = ((EnergyBar1 >= 10) and tbuffs[501502]) },				
					{ name = "Probing Attack",                     use = ((EnergyBar1 >= 20) and (not tbuffs["Vulnerable"])) },
					{ name = "Blood Dance",               		   use = (phealth >= .10)  },				
					{ name = "Shadowstab",                    	   use = (EnergyBar2 >= 20 and not tbuffs[501866])  },
						 }
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end		
		-------------------
		-- WARRIOR/SCOUT --
		-------------------
		elseif subClass == "RANGER" then
			--Timers for this class
			CreateDIYCETimer("Aim for the Wound", 38)
			
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
			
			if ((enemy) and (goat2 == "1")) then
				Skill2 = {
					{ name = "Survival Instinct",                  use = (PctH("player") < .30) },
					{ name = "Enraged",            				   use = (combat and (EnergyBar2 < 50)) },
					{ name = "Aim for the Wound",                  use = ((boss) and (EnergyBar2 >= 30)) , timer ="Aim for the Wound", },
					{ name = "Action: 10 (Brash Ferocity Strike)", use = (tbuffs[501502]) },
					{ name = "The Final Battle",                   use = ((thealth < 0.30) and (EnergyBar1 >= 25)) },
					--{ name = "Slash",                     	     use = ((EnergyBar1 >= 25) and not tbuffs[500081]) }, --works onley whit axe or sword
					--{ name = "Tactical Attack",                    use = ((EnergyBar1 >= 15) and tbuffs[500081]) },
					{ name = "Open Flank",                   	   use = ((EnergyBar1 >= 10) and tbuffs[501502]) },
					{ name = "Probing Attack",                     use = ((EnergyBar1 >= 20) and(not tbuffs[500081])) },
					{ name = "Vampire Arrows",                     use = ((boss) and (not tbuffs["Vampire Arrows"]) and (EnergyBar2 >= 20)) },
					{ name = "Skull Breaker",                      use = (EnergyBar2 >= 30) },
					{ name = "Shot",                      		   use = (true) },
						 }
			elseif ((enemy) and (goat2 == "2")) then
				Skill2 = {
					{ name = "Aim for the Wound",                  use = (EnergyBar2 >= 30) , ignoretimer = not boss },
					{ name = "Vampire Arrows",                     use = ((not tbuffs["Vampire Arrows"]) and (EnergyBar2 >= 20)) },			
					{ name = "Sword Breath",                       use = (EnergyBar2 >= 25) },
					{ name = "Shot",                      		   use = (true) },
						 }
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		------------------
		-- WARRIOR/MAGE -- 10.01.2014
		------------------
		elseif subClass == "MAGE" then
			--Timers for this class
			CreateDIYCETimer("Touch", 3)
			
			if goat2 == "0" then	-- Long buffs
				Skill = {
					--{ name = "ID: 490248",			use = not pbuffs[500366] },											-- Fire Ward
					{ name = "ID: 490062",			use = pctEB2 >= .05 and not pbuffs[500162] },							-- Lightning Burn Weapon
					{ name = "ItemID: 207200",		use = not pbuffs[506684] and CE.HaveItem(207200) and CE.ItemCD(207200) },	-- Unbridled Enthusiasm
					--{ name = "ItemID: 207202", 		use = not pbuffs[506686] and CE.HaveItem(207202) and CE.ItemCD(207202) },	-- Clear Thought
					{ name = "ItemID: 207203",		use = not pbuffs[506687] and CE.HaveItem(207203) and CE.ItemCD(207203) },	-- Lucky Target
					{ name = "ItemID: 207206", 		use = not pbuffs[506690] and CE.HaveItem(207206) and CE.ItemCD(207206) },	-- Scarlet Love
						}
			elseif goat2 == "3" then	-- Boss burst buffs
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ID: 490123",			use = (not pbuffs[500107]) and boss },													-- Aggressiveness
					{ name = "ID: 497976",			use = (not pbuffs[620177]) and boss },													-- Intensification
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
					{ name = "ID: 490493",			use = (not pbuffs[500942]) and LongBuff and boss },										-- Frenzy
						}
			elseif goat2 == "4" then -- food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
				
			if ((enemy) and (goat2 == "1")) then -- main dps combo
				Skill2 = {
					{ name = "Func: CE.Pot()",	use = ((phealth < 0.60) and CE.PotCD() and (not SeigeWar))},	-- Phirius pot healing
					{ name = "ID: 490296",		use = silenceThis },												-- Silence
					{ name = "ID: 490062",		use = (pctEB2 >= .05) and (not pbuffs[500162]) },					-- Fire Lightning Weapon
					{ name = "ID: 491331",		use = (phealth <= .10) and combat },								-- Sense of Danger
					{ name = "ID: 490122",		use = (phealth <= .25) and combat },								-- Survival Instinct
					{ name = "ID: 490492",		use = (EnergyBar1 <= 30) and (boss or elite) },						-- Enraged
					{ name = "ID: 499994",		use = ((EnergyBar1 >= 15) and (pctEB2 >=.05) and (not pbuffs[622954] or (pbuffs[622954].time <= 2))) }, 	-- Electrical Rage with lv 70 elite skill
					{ name = "ID: 497845",    	use = (pctEB2 >= .05) },											-- Lightning's Touch
					{ name = "ID: 540000",		use = (true) },														-- Attack
						}
			elseif ((enemy) and (goat2 == "2")) then -- Ranged
				Skill2 = {
					{ name = "Func: CE.Pot()",	use = ((phealth < 0.60) and CE.PotCD() and (not SeigeWar))},	-- Phirius pot healing
					{ name = "ID: 490296",		use = (silenceThis) },	-- Silence
					{ name = "ID: 490212",		use = (true) },			-- Lightning
					{ name = "ID: 497844",		use = (true) },			-- Thunder Sword
					{ name = "ID: 490204",		use = (true) },			-- Fireball
						}
			elseif ((enemy) and (goat2 == "pvp")) then -- PvP
				Skill2 = {
					{ name = "ID: 490296",		use = silenceThis },	-- Silence
					{ name = "ID: 490212",		use = true },			-- Lightning
					{ name = "ID: 497844",		use = true },			-- Thunder Sword
					{ name = "ID: 490204",		use = true },			-- Fireball
						}
			elseif ((enemy) and (goat2 == "aoe")) then -- AoE
				Skill2 = {
					{ name = "ID: 490147",    	use = (EnergyBar1 >= 35) and (not tbuffs[500236])},	-- Blasting Cyclone
					{ name = "ID: 490492",    	use = EnergyBar1 <= 35},							-- Enraged
					{ name = "ID: 497845",    	use = pctEB2 >= .05, timer = "Touch" },				-- Lightning's Touch
					{ name = "ID: 540000",		use = true },										-- Attack
						}
			end	
		--------------------
		-- WARRIOR/KNIGHT --
		--------------------
		elseif subClass == "KNIGHT" then			
			if (goat2 == "0") then -- long buffs
				Skill =  {
					{ name = "Enhanced Armor",						use = (not pbuffs["Enhanced Armor"]) },
					{ name = "Blocking Stance",                     use = (not pbuffs["Blocking Stance"]) },
					{ name = "Action: 64 (Scarlet Love)",   		use = ((not pbuffs["Scarlet Love"])) }, -- Defence Potion
					{ name = "Action: 61 (Grassland Mix)",   		use = ((not pbuffs["Grassland Mix"])) }, -- HP food slot 61
					{ name = "Action: 41 (Roast	Wolf Leg)",   		use = ((not pbuffs["Roast Wolf Leg"])) }, -- Damage food slot 41
						 }
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end	 
				
			if ((enemy) and (goat2 == "1")) then -- dps
				Skill2 = {
					{ name = "Survival Instinct",                  use = (phealth <= .25) and combat },
					{ name = "Enhanced Armor",					   use = (pctEB2 >= .05) and ((not pbuffs["Enhanced Armor"]) or (pbuffs["Enhanced Armor"].time <= 45)) },
					{ name = "Blocking Stance",                    use = (pctEB2 >= .05) and ((not pbuffs["Blocking Stance"]) or (pbuffs["Blocking Stance"].time <= 45)) },
					--{ name = "Enraged",            			     use = (combat and (EnergyBar2 < 50)) },
				    --{ name = "Feint",   				   		     use = ((_target == UnitName("target")) and (_type == "DODGE")) },
					{ name = "Thunder",                   		   use = ((EnergyBar1 >= 15) and tbuffs[501503]) },
					{ name = "Open Flank",                   	   use = ((EnergyBar1 >= 10) and tbuffs[501502]) },
					{ name = "Probing Attack",                     use = ((EnergyBar1 >= 20) and (not tbuffs["Vulnerable"])) },
					{ name = "Slash",                              use = (EnergyBar1 > 60) },
					{ name = "Holy Strike",                        use = (true) },
						}
			elseif ((enemy) and (goat2 == "aoe")) then  -- agro
				Skill2 = {
					{ name = "Enhanced Armor",						use = (pctEB2 >= .05) and ((not pbuffs["Enhanced Armor"]) or (pbuffs["Enhanced Armor"].time <= 45)) },
					{ name = "Blocking Stance",                     use = (pctEB2 >= .05) and ((not pbuffs["Blocking Stance"]) or (pbuffs["Blocking Stance"].time <= 45)) },
					{ name = "Survival Instinct",                   use = (phealth <= .25) and combat },
					{ name = "Enraged",            				    use = (combat and (EnergyBar2 < 50)) },
					{ name = "Whirlwind",                           use = (EnergyBar1 >= 25) },
					{ name = "Holy Strike",                         use = (true) },
						}
			elseif ((enemy) and (goat2 == "2")) then   -- aoe
				Skill2 = {
					{ name = "Whirlwind",                           use = (EnergyBar1 >= 25) },
					{ name = "Blasting Cyclone",                    use = (EnergyBar1 >= 35) },
					{ name = "Holy Strike",                         use = (true) },
						}
			elseif ((enemy) and (goat2 == "pvp")) then
				Skill2 = {
					{ name = "Strike of Panishment",               use = (true) },
					{ name = "Blasting Cyclone",                   use = (EnergyBar1 >= 35) },
					{ name = "Thunder",                   		   use = ((EnergyBar1 >= 15) and tbuffs[501503]) },
					{ name = "Open Flank",                   	   use = ((EnergyBar1 >= 10) and tbuffs[501502]) },
					{ name = "Probing Attack",                     use = ((EnergyBar1 >= 20) and (not tbuffs[500081])) },
					{ name = "Slash",                              use = (EnergyBar1 > 60) },
					{ name = "Holy Strike",                        use = (true) },
						}
			end
		-------------------
		-- WARRIOR/DRUID --
		-------------------
		elseif subClass == "DRUID" then
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
			
			if ((enemy) and (goat2 == "1")) then -- Main DPS combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
		--------------------
		-- WARRIOR/PRIEST --
		--------------------
		elseif subClass == "AUGUR" then
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
			
			if ((enemy) and (goat2 == "1")) then -- Main DPS combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		--------------------
		-- WARRIOR/WARDEN --
		--------------------
		elseif subClass == "WARDEN" then
			--Timers for this class
			CreateDIYCETimer("Savage Whirlwind", 56)
			
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
			
			if ((enemy) and (goat2 == "1")) then
				Skill2 = {
					{ name = "ID: 490136",     use = (silenceThis) },                                             -- Shout
					{ name = "ID: 494624",     use = ((not pbuffs[505208]) or (pbuffs[505208].time <= 30)) },     -- Battle Creed
					{ name = "ID: 493642",     use = ((not pbuffs[503958]) or (pbuffs[503958].time <= 30)) },     -- Briar Shield
					{ name = "ID: 490122",     use = (PctH("player") < .30) },                                    -- Survival Instinct
					{ name = "ID: 490492",     use = (combat and (EnergyBar2 < 50)) },                            -- Enraged
					--{ name = "ID: 490089",     use = ((_target == UnitName("target")) and (_type == "DODGE")) },  -- Feint
					--{ name = "ID: 491139",     use = ((EnergyBar1 >= 15) and tbuffs[501503]) },                   -- Thunder -- one 1h wpn
					{ name = "ID: 494032",     use = ((true) and tbuffs[501502]) },                               -- Attack Weakener
					{ name = "ID: 499986",     use = ((boss) and (true)) , timer ="Savage Whirlwind", },          -- Savage Whirlwind
					{ name = "ID: 494080",     use = ((EnergyBar1 >= 10) and tbuffs[501502]) },                   -- Open Flank
					{ name = "ID: 494973",     use = ((EnergyBar1 >= 20) and(not tbuffs[500081])) },              -- Probing Attack
					{ name = "ID: 494974",     use = ((EnergyBar1 >= 60) and not tbuffs[500081]) },               -- Slash
					{ name = "ID: 491142",     use = ((EnergyBar1 >= 15) and tbuffs[500081]) },                   -- Tactical Attack
					{ name = "ID: 493395",     use = (true) },                                                    -- Charged Chop
						}
			elseif ((enemy) and (goat2 == "2")) then
				Skill2 = {
					{ name = "ID: 490147",     use = (EnergyBar1 >= 35) },                                        -- Blasting Cyclone
					{ name = "ID: 493392",     use = (true) },                                                    -- Power of the Wood Spirit
						 }
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		----------------------
		-- WARRIOR/CHAMPION --
		----------------------
		elseif subClass == "PSYRON" then
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
			
			if ((enemy) and (goat2 == "1")) then -- Main DPS combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		---------------------
		-- WARRIOR/WARLOCK -- test 15.01.2014
		---------------------
		elseif subClass == "HARPSYN" then
			if (goat2 == "0") then -- Long bufs
				Skill = {{ name = "Func: CE.NoCode()",	use = (true) }}
			elseif goat2 == "3" then -- Burst boss buff's
				Skill = {
					{ name = "Func: CE.Item("..Sigil..")",	use = Sigil_Use and CE.HaveItem(Sigil) and Sigil_Check and CE.ItemCD(Sigil)},	-- Sigil
					{ name = "ItemID: "..CritFood,	use = CritFood_Use and CE.HaveItem(CritFood) and CritFood_Check and CE.ItemCD(CritFood)},	-- Critical hit food
					{ name = "ItemID: "..SpeedPot,	use = SpeedPot_Use and CE.HaveItem(SpeedPot) and SpeedPot_Check and CE.ItemCD(SpeedPot)},	-- Cast or Attack speed pot
					{ name = "ItemID: "..CritPot,	use = CritPot_Use and CE.HaveItem(CritPot) and CritPot_Check and CE.ItemCD(CritPot) },		-- Critical hit pot
						}
			elseif goat2 == "4" then -- Food and potions
				Skill = {
					{ name = "ItemID: "..HpDef,			use = HpDef_Use and CE.HaveItem(HpDef) and HpDef_Check and CE.ItemCD(HpDef) },			-- Hp or Defense food
					{ name = "ItemID: "..DmgFood, 		use = DmgFood_Use and CE.HaveItem(DmgFood) and DmgFood_Check and CE.ItemCD(DmgFood) },	-- Attack or damage food
					{ name = "ItemID: 200277",			use = Hero_Use and CE.HaveItem(200277) and Hero and CE.ItemCD(200277) },		-- Hero potion
					{ name = "ItemID: 202242",			use = Realgar_Use and CE.HaveItem(202242) and Realgar and CE.ItemCD(202242) },	-- Aged Realgar Wine
					{ name = "Func: CE.ISFood()",		use = ISFood_Use and CE.HaveItem(ISFood) and ISFood_Check and CE.ItemCD(ISFood) },	-- ItemShop Hp/Def Food
						}
			end
			
			if ((enemy) and (goat2 == "1")) then -- Main DPS combo
				Skill2 = {
				    { name = "Psychic Whirlwind",                  use = ((EnergyBar1 >= 25) and tbuffs[501503]) },
				    { name = "Thunder",                   		   use = ((EnergyBar1 >= 15) and tbuffs[501503]) },
					{ name = "Open Flank",                   	   use = ((EnergyBar1 >= 10) and tbuffs[501502]) },
					{ name = "Probing Attack",                     use = ((EnergyBar1 >= 20) and (not tbuffs[500081])) },
					{ name = "Slash",                              use = (EnergyBar1 >= 60) },
					{ name = "Lightning Spell",                    use = (EnergyBar1 >= 60) },
					{ name = "Spirit-Cracking Blow",               use = (EnergyBar2 >= 30) },
					{ name = "Rage Blow",                          use = (EnergyBar2 >= 20) },
					     }
					
			elseif ((enemy) and (goat2 == "2")) then -- Ranged or instant skils combo
				Skill2 = {
				    { name = "ID: 490147",                         use = (EnergyBar1 >= 35) },                                        -- Blasting Cyclone
				    { name = "Psychic Ghost Step",                 use = (EnergyBar1 >= 15) },
					{ name = "Psychic Whirlwind",                  use = (EnergyBar1 >= 25) },
					{ name = "Spirit Blade Storm",                 use = (EnergyBar1 >= 35) },
					{ name = "Spirit-Cracking Blow",               use = (EnergyBar2 >= 30) },
					{ name = "Rage Blow",                          use = (EnergyBar2 >= 20) },
				         }
			elseif ((enemy) and (goat2 == "pvp")) then -- PVP combo
				Skill2 = {{ name = "Func: CE.NoCode()",	use = (true) }}
			end
		end
	end
    --End Player Skill Sequences
    if (not MyCombat(Skill, arg1)) then
        MyCombat(Skill2, arg1)
    end
end
